module.exports = function(grunt) {
    grunt.initConfig({
        pkg : grunt.file.readJSON('package.json'),
        copy : {
            main : {
                files : [{                    
                    src: [  //acucom
                        '../../res/build/*.min.js',
                        '../../res/grunt/**',                        
                        '../../res/js/**',  
                        '!../../res/js/adapter/**',                           
                        '../../res/language/**',                        
                        '../../res/sticker/**',                        
                        '../../res/favicon.ico',                        
                        '../../ui/*'
                    ], 
                    dest: '../../../deploy/acucom/'
                },{                    
                    src: [  //account
                        '../../../account/res/**',
                        '../../../account/ui/**'
                    ], 
                    dest: '../../../deploy/'
                },{                    
                    src: [  //wallboard
                        '../../../wallboard/res/**',
                        '../../../wallboard/ui/**'
                    ], 
                    dest: '../../../deploy/'
                }, {                    
                    src: [  //ujs
                        '../../ujs/app/im/css/page/**',
                        '../../ujs/app/im/images/**',
                        '../../ujs/app/im/load.js',                        
                        '../../ujs/app/pageDesigner/ui/**',
                        '../../ujs/app/pageDesigner/images/**',
                        '../../ujs/app/pageDesigner/load.js',                        
                        '../../ujs/audio/**',                        
                        '../../ujs/build/**/*.min.js',
                        '../../ujs/build/**/*.min.css',                        
                        '../../ujs/grunt/**',                        
                        '../../ujs/images/**',                        
                        '../../ujs/js/ujs.js',                        
                        '../../ujs/libs/**'                    
                    ], 
                    dest: '../../../deploy/'
                }]
            }
        },
        zip : {
            ujs : {
                rootDir : '../../../deploy',
                src: ['../../../deploy/ujs/**'],
                dest: '../../../deploy/ujs.zip'
            },
            acucom: {
                rootDir : '../../../deploy/acucom',
                src: ['../../../deploy/acucom/**'],
                dest: '../../../deploy/acucom.zip'
            },
            account: {
                rootDir : '../../../deploy/account',
                src: ['../../../deploy/account/**'],
                dest: '../../../deploy/account.zip'
            },
            wallboard: {
                rootDir : '../../../deploy/wallboard',
                src: ['../../../deploy/wallboard/**'],
                dest: '../../../deploy/wallboard.zip'
            }
        }
    });
    require('./../../tools/grunt/node_modules/grunt-contrib-copy/tasks/copy.js')(grunt);
    require('./../../tools/grunt/node_modules/grunt-zip/tasks/zip.js')(grunt);
    
    grunt.registerTask('default', ['copy', 'zip']);
};